public class Job4 {
    public static void main(String[] args) {
        int num=10000;
        int a=2;
        int b=0;
        for (num=10000;;num++){
            for (a=2;num%a!=0 && a*a<num;a++);
               if (a*a>num){
                   b++;
                   System.out.println(num);
                   if (b>=10){
                       break;
                   }
               }
            }
        }
    }

